package com.soulless.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author zenglei
 * @Description 功能描述
 * @date 2020/7/29 9:52
 */
@PropertySource({"classpath:/resources/resource.properties"})
@Controller
public class HelloWorldController {

    @Value("${hello.name}")
    private String name;

    @RequestMapping("/")
    @ResponseBody
    public String home() {
        System.out.println("name: " + name);
        return "Hello " + this.name;
    }

}
